/*    */ package nc.bs.ic.m46.update;
/*    */ 
/*    */ import java.io.Serializable;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import nc.bs.ic.general.insert.rule.before.CheckCliabilityValue;
/*    */ import nc.bs.ic.general.update.IUpdateBP;
/*    */ import nc.bs.ic.general.update.UpdateBPTemplate;
/*    */ import nc.bs.ic.general.update.rule.after.RewriteQCUpdateRule;
/*    */ import nc.bs.ic.m46.base.BPPlugInPoint;
/*    */ import nc.bs.ic.m46.base.ProdInWarehouseAttriCheck;
/*    */ import nc.bs.ic.m46.rule.CprowarehouseCheck;
/*    */ import nc.bs.ic.m46.update.rule.UpdateBomCheck;
/*    */ import nc.bs.ic.m46.update.rule.UpdateRewriteMMDP;
/*    */ import nc.bs.ic.m46.update.rule.UpdateRewriteMMPAC;
/*    */ import nc.bs.ic.pub.base.ICCompareAroundProcesser;
/*    */ import nc.bs.ic.pub.base.IUpdateRuleProvider;
/*    */ import nc.bs.ic.pub.util.SagasUtils;
/*    */ import nc.bs.scmpub.rule.VOSagaFrozenValidateRule;
/*    */ import nc.impl.pubapp.pattern.rule.processer.CompareAroundProcesser;
/*    */ import nc.vo.ic.general.define.ICBillVO;
/*    */ import nc.vo.ic.m46.entity.FinProdInVO;
/*    */ import nc.vo.pubapp.pattern.model.entity.bill.AbstractBill;
/*    */ import nc.vo.scmpub.res.billtype.ICBillType;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class UpdateBP
/*    */   extends Object
/*    */   implements IUpdateBP<FinProdInVO>, IUpdateRuleProvider<FinProdInVO>
/*    */ {
/*    */   public void addAfterRule(FinProdInVO[] vos, FinProdInVO[] originVOs, CompareAroundProcesser<FinProdInVO> processor) {
/* 57 */     processor.addAfterRule(new RewriteQCUpdateRule());
/*    */ 
/*    */ 
/*    */ 
/*    */     
/* 62 */     ((ICCompareAroundProcesser)processor).addAfterRuleAt(new UpdateRewriteMMPAC(), nc.bs.ic.general.rule.after.AtpAfterUpdate.class);
/*    */ 
/*    */ 
/*    */     
/* 66 */     processor.addAfterRule(new UpdateRewriteMMDP());
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public void addBeforeRule(FinProdInVO[] vos, FinProdInVO[] originVOs, CompareAroundProcesser<FinProdInVO> processor) {
/* 73 */     processor.addBeforeRule(new VOSagaFrozenValidateRule(true));
/*    */     
/* 75 */     processor.addBeforeRule(new ProdInWarehouseAttriCheck());
/* 76 */     processor.addBeforeRule(new CprowarehouseCheck());
/*    */     
/* 78 */     processor.addBeforeRule(new CheckCliabilityValue("cliabilityoid", "cioliabilityoid"));
/*    */     
/* 80 */     processor.addBeforeRule(new UpdateBomCheck());
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public FinProdInVO[] update(FinProdInVO[] vos, FinProdInVO[] originVOs) {
/* 86 */     SagasUtils.frozenAndAddSaga(vos, ICBillType.ProductionIn.getCode(), "1", null);
/* 87 */     Map<String, Serializable> paramMap = new HashMap<String, Serializable>();
/* 88 */     paramMap.put("actionname", "update_46");
/* 89 */     paramMap.put("vos", SagasUtils.produceLightVO(vos, originVOs));
/* 90 */     SagasUtils.compensate(paramMap, nc.itf.ic.m46.compensate.IProductInSagasCompensate.class);
/* 91 */     return (FinProdInVO[])(new UpdateBPTemplate(BPPlugInPoint.UpdateBP, this)).update(vos, originVOs);
/*    */   }
/*    */ }


/* Location:              E:\zhuhai_ncc\NCC2111\modules\ic\META-INF\lib\ic_inbound.jar!/nc/bs/ic/m46/update/UpdateBP.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */